import http from "@/utils/http";

/**
 * 检查记录 分页模糊查询
 * @returns
 */
export function findRecord(baseUrl,params) {
  return http.get(`${baseUrl?baseUrl:""}/api/recordInfo/getRecord`, { params });
}
/**
 * 连表 分页模糊查询
 * @returns
 */
export function findRecordAndPatient(baseUrl,params) {
  return http.post(
    `${baseUrl?baseUrl:""}/api/recordInfo/getAllRecordAndPatientInfo`,params);
}
/**
 * 同步病人端数据
 */
export function syncPatientData(baseUrl,params) {
  return http.post(`${baseUrl?baseUrl:""}/api/recordInfo/synchronization`, params);
}

/**
 * 添加 检查记录
 * @returns
 */
export function addRecord(baseUrl,params) {
  return http.post(`${baseUrl?baseUrl:""}/api/recordInfo/addNewRecordInfo`, params);
}
/**
 * 批量 添加 检查记录
 * @returns
 */
export function bulkCreateRecord(baseUrl,params) {
  return http.post(`${baseUrl?baseUrl:""}/api/recordInfo/bulkCreateRecord`, params);
}
/**
 * 更新 检查记录
 * @returns
 */
export function updateRecord(baseUrl,id, params) {
  return http.post(`${baseUrl?baseUrl:""}/api/recordInfo/updateRecordInfo/${id}`, params);
}
/**
 * 删除 检查记录
 * @returns
 */
export function deleteRecord(baseUrl,id) {
  return http.post(`${baseUrl?baseUrl:""}/api/recordInfo/delRecordInfo/${id}`);
}
/**
 * 批量 删除 检查记录
 * @returns
 */
export function bulkDeleteRecord(baseUrl,params) {
  return http.post(`${baseUrl?baseUrl:""}/api/recordInfo/bulkDelRecordInfo`, params);
}

/**
 * 获取所有的 检查记录
 * @returns
 */
export function getAllRecord(baseUrl) {
  return http.get(`${baseUrl?baseUrl:""}/api/recordInfo/getAllRecordInfo`);
}

/**
 * 根据id获取 检查记录
 * @returns
 */
export function getRecordById(baseUrl,id) {
  return http.get(`${baseUrl?baseUrl:""}/api/recordInfo/getRecordInfo/${id}`);
}

/**
 * 未检查的病人及信息
 * @returns
 */
export function findNoCheckedRecord(baseUrl) {
  return http.get(`${baseUrl?baseUrl:""}/api/recordInfo/findNoCheckedRecord`);
}


/**
 * 根据state批量删除Record
 * @returns
 */
 export function bulkDeleteByState(baseUrl) {
  return http.get(`${baseUrl?baseUrl:""}/api/recordInfo/bulkDeleteByState`);
}


